<?php
/**
 * @Author:      zhaoyang
 * @DateTime:    2018-1-30 
 * @Description: PMS 订货单
 */
class PMSPlanOrder extends Eloquent
{
    protected $table = "pms_plan_order";
    protected $primaryKey = 'plan_code';

    public static $status = [1=>"拼货中",2=>"待收货",3=>"已收货"];
    public static $pay_type = [0=>"现金", 1=>"定期"];
    
    //获取订货单的下单时间
    public static function get_submit_at($plan_code){
        $plan = PMSPlanOrder::where("plan_code",$plan_code)->first();
        return $plan->submit_at;
    }
}